//
//  WKContenCellQuestionView.m
//  WKMaybell
//
//  Created by 何文虎 on 2018/12/6.
//  Copyright © 2018年 何文虎. All rights reserved.
//

#import "WKContenCellQuestionView.h"

@implementation WKContenCellQuestionView

- (instancetype)init{
    if (self == [super init]) {
        [self setup];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame{
    if (self == [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}

- (void)setup{
    
    [self addSubview:self.contentLb];
//    self.contentLb.sd_layout
//    .leftSpaceToView(self, 0)
//    .topSpaceToView(self, 0)
//    .rightSpaceToView(self, 0)
//    .autoHeightRatio(0);
    
    [self.contentLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.width.mas_equalTo(self);
    }];

    _contentLb.numberOfLines = 0;
    _contentLb.preferredMaxLayoutWidth = ScreenWidth-24;
    [_contentLb sizeToFit];
}

- (void)setQuestionStr:(NSString *)questionStr{
    _questionStr = questionStr;
    _contentLb.text = _questionStr;
}

- (UILabel*)contentLb{
    if (!_contentLb) {
        _contentLb = [[UILabel alloc]init];
        _contentLb.font = PFSC_RegularFont(12);
        _contentLb.textColor = UIColorFromHex(0x979797);
    }
    return _contentLb;
}

@end
